/**
 * Created by Peter.D.Wang on 2015/8/14.
 */
$(function() {
    var aArray = $(".btn-margin");
    aArray.each(function (index, element) {
        $(element).click(function () {
            aArray.each(function (i, e) {
                if (index === i) {
                    $(element).removeClass("btn-default-ritetrek");
                } else {
                    $(e).addClass("btn-default-ritetrek");
                }
            });
        });
    });
});